<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
	<title>配送关系日志查看（生产企业查看某个区域内商品的设置日志）</title>
	<%@ include file="/WEB-INF/component/commonCSS.jsp"%>
    <!--[if lt IE 9]>
        <script src="lib/js/html5shiv.min.js"></script>
        <script src="lib/js/respond.min.js"></script>
    <![endif]-->
 	
   
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
    <section class="content-header">
        <h1>设置日志</h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
            <li class="active"><a href="#">目录管理</a></li>
            <li class="active"><a href="#">配送关系管理</a></li>
            <li class="active"><a href="#">设置配送关系</a></li>
        </ol>
    </section>
    
    <section class="content">
        <div class=" box box-success">
            <div class="box-body">
                <div class="form-inline">
                 <div class="form-group form-group-xs">
					<label>企业编码：</label> <input class="form-control" type="text" name="compCode" id="compCode" placeholder="企业编码"  /> 
				</div>
				<div class="form-group form-group-xs">
					<label>企业名称：</label> <input class="form-control" type="text" name="compName" id="compName" placeholder="企业名称" /> 
				</div>
				<div class="form-group form-group-xs">
                        <label for="searchPharCode">操作日期：</label>
                        <input class="form-control" type="text" id="startDate"  placeholder="yyyy-mm-dd" onFocus="var endDate=$dp.$('submitEndDatetime');WdatePicker({maxDate:'#F{$dp.$D(\'endDate\')}'})"  />
                        -
                        <input class="form-control" type="text" id="endDate"  placeholder="yyyy-mm-dd" onFocus="WdatePicker({minDate:'#F{$dp.$D(\'startDate\')}'})" />
                    </div>
                    <button type="button"  onclick="gridSerch()"  class="btn btn-success btn-sm">查&nbsp;询</button>
                </div>
            </div>
        </div>
         
        <table class="jqgrid" id="list4"></table>
        <div id="prowed2"></div>
        
		<div class=" box box-warning bottongroup" id="bottongroup">
		<label  onclick="window.location.href='${ctx}/baseDel/toCenterDelByArea.html?goodsCode=${param.goodsCode}&projID=${param.projID}'"   class="btn btn-default btn-sm" >返 回</label>
		</div>
          <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <table id="listy"></table>
                    <div id="prowedy"></div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" onclick="save();" class="btn btn-primary btn-sm">保存</button>
                        <button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">关闭</button>
                    </div>
                </div>
            </div>
	<table class="jqgrid" id="list4"></table>
<div style="margin-top: 10px;"></div>
</section>
<%@ include file="/WEB-INF/component/commonJS.jsp"%>
<script type="text/javascript">


$(function () {
jQuery("#list4").jqGrid({
	url: "${ctx}/baseDel/getDelByHospLogData.html?hospCode=${param.hospCode}&goodsCode=${param.goodsCode}",
    mtype: "POST",
	datatype: "json",
	autowidth: true,
	shrinkToFit: false,
	height: 250,
   	colNames:['企业编码','企业名称','组织机构代码','联系人','联系电话','状态','操作时间'],
   	colModel:[
		{name:'del_comp_code',index:'del_comp_code', width:210,align:"center", sorttype:false},
		{name:'del_comp_name',index:'del_comp_name', width:250, sorttype:"date",align:"center"},
   		{name:'org_code',index:'drugName', width:120,align:"center", sorttype:false},
   		{name:'contact_name',index:'compName', width:120, sorttype:false,align:"center"},
   		{name:'contact_telephone',index:'areaName', width:120, sorttype:false,align:"center"},
   		{name:'status',index:'formName', width:100, align:"center"},
   		{name:'upd_datetime',index:'specName', width:200, align:"center",sorttype:false}
		
   	],
	 rowNum: 20,
     rowList: [10, 20, 50,100],
     rownumbers: true,
     pager: "#prowed2",
     viewrecords: true,
     caption: "${param.goods_code}/${form.drug_code}/${form.qualityspec_name}/${form.form_name}/${form.spec_name}/${form.factor}${form.unit_name}/${form.material_name}—${hospName}",
     editurl:"proPlanItemListHis.jsp",
     jsonReader: {
         repeatitems: false,
         id: "ids"
     }
   	
});
	 
	jQuery("#list4").jqGrid('navGrid',"prowed2",{edit:false,add:false,del:false});
	
	
});

function gridSerch() {
	var compCode = $.trim($("#compCode").val());
	var compName = $.trim($("#compName").val());
	var startDate = $.trim($("#startDate").val());
	var endDate = $.trim($("#endDate").val());
	$("#list4").jqGrid('setGridParam',{  
        datatype:'json',
        postData:{
        	"compCode":compCode,
        	"compName":compName,
        	"startDate":startDate,
        		"endDate":endDate}
    }).trigger("reloadGrid"); //重新载入  
}

</script>
</body>
</html>